﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TSL.OnLines
{
    /// <summary>
    /// 单个在线用户数据，无法继承此类。
    /// </summary> 
    public sealed class ActiveUser
    {
        private readonly string _username;   //登陆用户名
        private readonly DateTime _refreshtime;  //最新刷新时间
        private readonly string _clientip;   //登陆IP

        public ActiveUser(string UserName, string ClientIP)
        {
            this._username = UserName;
            this._refreshtime = DateTime.Now;
            this._clientip = ClientIP;
        }

        public ActiveUser(string UserName, DateTime RefreshTime, string ClientIP)
        {
            this._username = UserName;
            this._refreshtime = RefreshTime;
            this._clientip = ClientIP;
        }

        public string UserName { get { return _username; } }
        public DateTime RefreshTime { get { return _refreshtime; } }
        public string ClientIP { get { return _clientip; } }

    }
}
